<#include "../common/nolayout.ftl"/>
<@html css_=['user/public.css'] js_=['user/blog_edit.js']>
<body class="childrenBody">
<form class="layui-form layui-row layui-col-space10" action="${root}/m/blog/edit/${blog.id}" method="post" id="listForm">
    <input type="hidden" name="banner" id="banner" value="${blog.banner}"/>
    <input type="hidden" name="content" id="content"/>
    <input type="hidden" name="blogTypeId" id="blogTypeId" value=""/>
    <input type="hidden" name="openup" id="openup" value="${blog.openup}"/>
    <div class="layui-col-md9 layui-col-xs12">
        <div class="layui-row layui-col-space10">
            <div class="layui-col-md9 layui-col-xs9">
                <div class="layui-form-item magt3">
                    <label class="layui-form-label">标题</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" value="${blog.title}" class="layui-input title"  placeholder="请输入标题">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">摘要</label>
                    <div class="layui-input-block">
                        <textarea name="abstracts" placeholder="请输入摘要" class="layui-textarea abstract">${blog.abstracts}</textarea>
                    </div>
                </div>
            </div>
            <div class="layui-col-md3 layui-col-xs3">
                <div class="layui-upload-list thumbBox mag0 magt3">
                    <img class="layui-upload-img thumbImg" src="${blog.banner!''}">
                </div>
            </div>
        </div>
        <div class="layui-form-item magb0">
            <label class="layui-form-label">内容</label>
            <div class="layui-input-block">
                <textarea class="layui-textarea " id="contents">${blogExt.content}</textarea>
            </div>
        </div>
    </div>
    <div class="layui-col-md3 layui-col-xs12">
        <blockquote class="layui-elem-quote title"><i class="seraph icon-caidan"></i> 分类目录</blockquote>
        <div class="border category blogType">
            <div class="">
                <#list types as type>
                    <p>
                        <input type="checkbox" name="blog_type" type-id="${type.id}" title="${type.name}" lay-skin="primary"
                        <#if blog.blogTypeId?contains(type.id)>checked</#if>/>
                    </p>
                </#list>
            </div>
        </div>
        <blockquote class="layui-elem-quote title magt10"><i class="layui-icon">&#xe609;</i> 发布</blockquote>
        <div class="border">
            <div class="layui-form-item openness">
                <label class="layui-form-label"><i class="layui-icon">&#xe60f;</i> 开　放</label>
                <div class="layui-input-block">
                    <input type="radio" name="openness" value="1" title="开放" lay-skin="primary" <#if blog.openup==1>checked</#if>/>
                    <input type="radio" name="openness" value="0" title="私密" lay-skin="primary" <#if blog.openup==0>checked</#if>/>
                </div>
            </div>
            <div class="layui-form-item newsTop">
                <label class="layui-form-label"><i class="seraph icon-zhiding"></i> 置　顶</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="newsTop" lay-skin="switch" lay-text="是|否">
                </div>
            </div>
            <hr class="layui-bg-gray" />
            <div class="layui-right">
                <a class="layui-btn layui-btn-sm" lay-filter="editBlog" lay-submit><i class="layui-icon">&#xe609;</i>保存修改</a>
            </div>
        </div>
    </div>
</form>
</body>
</@html>